[20251206] BOJ / G5 / 암호코드 / 이준희 #1595
Merged
+38
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://www.acmicpc.net/problem/2011
🧭 풀이 시간
50분
👀 체감 난이도
✏️ 문제 설명
단어를 숫자로 표현한 암호가 있고
각 알파벳이 1~26으로 표현됩니다.
이 때 숫자암호가 주어졌을 때 이를 단어로 바꿨을 때 만들 수 있는 단어의 가짓수를 구하는 문제입니다.
🔍 풀이 방법
dp를 이용해서 풀었습니다. 11 같은 숫자는 AA 또는 K 이렇게 2가지 경우로 나타낼 수 있으므로
숫자가 2자리, 1자리인 경우를 고려해서 dp 리스트를 갱신했습니다.
⏳ 회고
00 01 같은 숫자를 처리를 안했어가지고 이 부분에 대해 생각하는 것이 쉽지 않았던 것 같습니다.